home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-23 | 5.2 KB | 262 lines | [TEXT/MPS ] |
- //----------------------------------------------------------------------//
- // CoreSample.r - Rez Source //
- // //
- // CoreSample is an application that is Apple Event-aware, Scripting //
- // Compatible, and recordable. It provides support for the Required //
- // and Core suite of Apple Events, the Object Model, and the Open //
- // Scripting Architecture. //
- // //
- // by: Sue Dumont //
- // Applications Scripting Group //
- // //
- // Copyright © Apple Computer, Inc. 1991-93 //
- // All rights reserved. //
- //----------------------------------------------------------------------//
-
- #include "systypes.r"
- #include "types.r"
- #include "CoreSample.h"
-
- resource 'vers' (1) {
- 0x01, 0x01, release, 0x00, verUS,
- "1.1",
- "1.1, Copyright \251 Apple Computer, Inc. 1991-1993"
- };
-
- resource 'MBAR' (rMenuBar, preload) {
- { mApple, mFile, mEdit }; /* three menus */
- };
-
-
- resource 'MENU' (mApple, preload) {
- mApple, textMenuProc,
- 0b1111111111111111111111111111101, /* disable dashed line, enable About and DAs */
- enabled, apple,
- {
- "About CoreSample\311",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, preload) {
- mFile, textMenuProc,
- 0b0000000000000000000000010000000, /* Enable Quit only, program enables others. */
- enabled, "File",
- {
- "New",
- noicon, "N", nomark, plain;
- "Open",
- noicon, "O", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Close",
- noicon, "W", nomark, plain;
- "Save",
- noicon, "S", nomark, plain;
- "Save As\311",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Quit",
- noicon, "Q", nomark, plain
- }
- };
-
- resource 'MENU' (mEdit, preload) {
- mEdit, textMenuProc,
- 0b0000000000000000000000000000000, /* disable everything, program does the enabling */
- enabled, "Edit",
- {
- "Undo",
- noicon, "Z", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Cut",
- noicon, "X", nomark, plain;
- "Copy",
- noicon, "C", nomark, plain;
- "Paste",
- noicon, "V", nomark, plain;
- "Clear",
- noicon, nokey, nomark, plain
- }
- };
-
-
- /* this ALRT and DITL are used as an About screen */
-
- resource 'ALRT' (rAboutAlert, purgeable) {
- {40, 20, 214, 296}, rAboutAlert, {
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent
- };
- };
-
- resource 'DITL' (rAboutAlert, purgeable) {
- { /* array DITLarray: 7 elements */
- /* [1] */
- {148, 184, 168, 264},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {8, 69, 24, 295},
- StaticText {
- disabled,
- "CoreSample 1.1"
- },
- /* [3] */
- {28, 40, 44, 295},
- StaticText {
- disabled,
- "Recordable and Scriptable"
- },
-
- /* [4] */
- {50, 8, 66, 295},
- StaticText {
- disabled,
- "Copyright \251 Apple Computer, 1991-93"
- },
- /* [5] */
- {80, 8, 112, 136},
- StaticText {
- disabled,
- "by:"
- },
- /* [6] */
- {95, 69, 127, 167},
- StaticText {
- disabled,
- "Sue Dumont"
- },
- /* [7] */
- {111, 20, 140, 206},
- StaticText {
- disabled,
- "Applications Scripting Group"
- }
- }
- };
-
-
- /* this ALRT and DITL are used as an error screen */
-
- resource 'ALRT' (rUserAlert, purgeable) {
- {40, 20, 150, 260},
- rUserAlert,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent,
- /* [2] */
- OK, visible, silent,
- /* [3] */
- OK, visible, silent,
- /* [4] */
- OK, visible, silent
- }
- };
-
-
- resource 'DITL' (rUserAlert, purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {80, 150, 100, 230},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {10, 60, 60, 230},
- StaticText {
- disabled,
- "Error! ^0!"
- },
- /* [3] */
- {8, 8, 40, 40},
- Icon {
- disabled,
- 2
- }
- }
- };
-
- resource 'WIND' (rDocWindow, preload, purgeable) {
- {64, 60, 250, 360},
- zoomDocProc, invisible, goAway, 0x0, "untitled"
- };
-
- resource 'STR#' (kErrStrings, purgeable) {
- {
- "You must run on 512Ke or later";
- "Application Memory Size is too small";
- "Not enough memory to run CoreSample";
- "Apple Event error has occured"
- }
- };
-
- /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
-
- resource 'SIZE' (-1) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground, /* we can background; we don't currently, but our sleep value */
- /* guarantees we don't hog the Mac while we are in the background */
- doesActivateOnFGSwitch, /* this says we do our own activate/deactivate; don't fake us out */
- backgroundAndForeground, /* this is definitely not a background-only application! */
- dontGetFrontClicks, /* change this is if you want "do first click" behavior like the Finder */
- ignoreAppDiedEvents, /* essentially, I'm not a debugger (sub-launching) */
- is32BitCompatible, /* this app should not be run in 32-bit address space */
- isHighLevelEventAware, /* set this flag to support Apple Events */
- localAndRemoteHLEvents, /* <aevt */
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- kPrefSize * 1024,
- kMinSize * 1024
- };
-
-
-
- type 'smpl' as 'STR ';
-
-
- resource 'smpl' (0) {
- "Application that supports Apple Events and AppleScript"
- };
-
-
-
- resource 'BNDL' (128) {
- 'smpl',
- 0,
- {
- 'ICN#',
- {
- 0, 128
- },
- 'FREF',
- {
- 0, 128
- }
- }
- };
-
-
- resource 'FREF' (128) {
- 'APPL',
- 0,
- ""
- };
-
-
- include "CoreSample.rsrc" not 'ckid';
-